package com.dom.stor.dao.service;

import com.dom.stor.dao.entity.TsStockInDetailFlow;
import com.dom.stor.dao.entity.TsStorGoodsDetailInfo;
import com.baomidou.mybatisplus.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * B_库存商品明细表 服务类
 * </p>
 *
 * @author xllei
 * @since 2019-01-01
 */
public interface ITsStorGoodsDetailInfoService extends IService<TsStorGoodsDetailInfo> {
    /**
     * 增加库存明细
     * @param memCode
     * @param storId
     * @param goodCode
     * @param amount
     * @return
     */
    boolean addStorageDetail(int memCode, Integer storId, Integer goodCode, BigDecimal amount);

    /**
     * 增加库存明细
     * @param memCode
     * @param storId
     * @param stockInDetailFlows
     * @return
     */
    boolean addStorageDetail(int memCode, Integer storId, List<TsStockInDetailFlow> stockInDetailFlows);

    /**
     * 冻结库存明细
     * @param memCode
     * @param storId
     * @param goodCode
     * @param amount
     * @return
     */
    boolean freezeStorageDetail(int memCode, Integer storId, Integer goodCode, BigDecimal amount);

    /**
     * 解冻库存明细
     * @param memCode
     * @param storId
     * @param goodCode
     * @param amount
     * @return
     */
    boolean unfreezeStorageDetail(int memCode, Integer storId, Integer goodCode, BigDecimal amount);

    /**
     * 扣减库存明细
     * @param memCode
     * @param storId
     * @param goodCode
     * @param amount
     * @return
     */
    boolean reduceStorageDetail(int memCode, Integer storId, Integer goodCode, BigDecimal amount);
}
